switch order for nil values