Use is_empty where appropriate.