Swapped null checks for empty string checks