fix exception when passing a nil value for a Hash required param