Using empty instead of array_key_exists

For all databases, not MySql only.