if (obj instanceof byte[]) {
return new OtpErlangBinary((byte[]) obj);
} else if (obj instanceof Boolean) {
return new OtpErlangBoolean((Boolean) obj);
} else if (obj instanceof Byte) {
return new OtpErlangByte((Byte) obj);
} else if (obj instanceof Character) {
return new OtpErlangChar((Character) obj);
} else if (obj instanceof Double) {
return new OtpErlangDouble((Double) obj);
} else if (obj instanceof Float) {