Problem:
There are cases when you you simply want to get the encapsulated value (type and object) of a BSONElement so that you can put this value elsewhere.
Workaround:
Use a switch statement to examine the type and then call the appropriate access method to get a String, Number, date etc. before putting this into the target element.