I just figured that this param check has to be done up there, since they are being used earlier than the actual check