Reworked java conversiosn check