Implemented validation of instance of adapter before serialize and unserialize methods - Issue #10