Staying safe with empty()