Replaced usage of drupalgap_empty() with empty().