add missing check for undef in is_mounted