Small fix for unecessary check if array is empty