In java, add type detection for String, bool, int, float