changed semantics of to<T> method to put formatting as first argument, and less complexity by moving nullable conversions first