class BaseType {

    public boolean isSameTypeAs(Object that) {
        if (equals(that)){
            return true;
        }
        if (that instanceof String) {
            if (toString().equalsIgnoreCase((String)that)) {
                return true;
            }
        }
        return false;
    }

}