Raise error when providing an invalid type.

If an invalid type was provided then the binary would not fail, and
subsequently serialize a nil when converting to BSON resulting in very
hard to track down errors. This now fails fast and raises an InvalidType
at the time of instantiation.