Fix php error with empty()