Observer

IF you use BasicDBOject you will have access to getString  , getInt methods and you will remove casting