check if key is not undef