[conversion] Fix warning.

Handle the un-expected #f return value by erroring.
Merge pull request #831 from waywardmonkeys/fix-conversion-warning

[conversion] Fix warning by minor code restructuring.