Fix requireParams to handle null as a missing value.