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