added check to only do conversion when input type is int-like

added test