} else if (obj instanceof Integer) {
return new OtpErlangInt((Integer) obj);
} else if (obj instanceof Long) {
return new OtpErlangLong((Long) obj);
} else if (obj instanceof Short) {
return new OtpErlangShort((Short) obj);
} else if (obj instanceof String) {
return new OtpErlangString((String) obj);
} else {
throw new ErlangConversionException(
"Could not convert Java object of type [" + obj.getClass()