Line 252: Changed .empty? to .present? to handle nil case

Fixes error message: undefined method empty? for nil