I don't think the typeof is required here, as the regular coercion should catch the undefined case.