Add null checks if the parameters are mandatory.