Fix a build warning due to checking a required value type for null