Removed superfluous null value on the return condition when no elements is present