In case a radio exists, but is disabled, the survey request will return
successfully, but without data.
The code could not handle this case, as the newest_element_index would
be negative in this case, leading to json_object_array_get_idx returning
a null-pointer.
Check for a null pointer prior adding the PHY index, avoiding a
null-pointer dereference.
Signed-off-by: David Bauer <mail@david-bauer.net>