Removed ToDocument if statement from _mapToDocument method.

Dart does not differentiate functions with same arguments but different return types, so any function with no arguments would end up trapped in that if statement.