Explicit check for undefined instead of !