Fix: undefined method 'strip' for nil:NilClass.