You might want to try using the automounter. There's a good article about it written by Rajeev Karamchedu. It should, for the most part, prevent your mount from hanging.
Note that there's not any convenient way to keep your system from trying to contact the server when you access the file path, so there will always be a slight delay during the initial connection attempt before it realizes the server is not there.
If you really want to get in to the gritty details, you could create an executable map. Read man 5 auto_master
on your Mac to learn about those. The executable map could check which network you are connected to and present the appropriate set of mountpoints to the automounter, preventing it from ever thinking about your NFS mount when you are away from the home network.