resolves #23 checks for undefined and null values on create