takeWhile typechecks