[fix] fixed builder to allow setting of type
[fix] changed constructor so that null or empty strings are not allowed