using array_key_exists() instead of isset() - required because in case the value is null isset is returning false