chech hasNext() first