Update BaseConverter.java

Perhaps fix this disgusting switch/case tree with a generic solution?