Check if while or loop return a value and add tests.
Check if while or loop return a value and add tests.