Good points! Building on the market value point . . . Market value is not what a job website tells you is the average for your area. It is what companies are willing to pay *you* for your specific skills. Sometimes that might be higher than the average. Or maybe you are well paid. It is good to test the market every couple of years, find out what you are worth, and if you need to pick up a skill or two. This can also help with job satisfaction, as we all often feel underpaid and overworked.
It is not typically good form to broadcast to your current company that you are applying or interviewing other places. Not much good comes from that conversation. But it is good to know what you are worth. It gives confidence when asking for a raise or other things from your current work.
If you get an offer and want to ask you current company to match it, ensure you are really ready to leave before bringing it up. Also, you can only do that once or twice before it starts to get old. At some point, they are going to question whether you are going to threaten to leave all the time, before they decide to invest in you and give you important projects.