Cannot Hide Google Map if custom field is blank

I would try

if ( $map && $map != "" )

as you set the variable, but it can also contain an empty string.

tech