Check if variable exists before calling .empty? on it.
Check if variable exists before calling .empty? on it.