Fixed that to_sym was called on Nil value