Fix improper handling of None when string expected.

Fixes mitsuhiko/flask#857