Yes, you need a return null if the while loop completes without error.