Made ExternalFunction safe for zero length arrays