refactor deserializeValue method to use handler obj & removed switch statements