MAGMA-247 - added condition to prevent creating null-value attributes