Is the ternary necessary? You're already performing a hard check that it's not nil with check_if_param in the line above