obj-c: Handle nil values for params without crashing