Check undef because caller may pass undef value.