Better handling of NULL elements in an Array