Catches function not having a return value

If the function does not assign to a return value it will throw an
error.