Fix 'Creating default object from empty value'

Check for null value fixes error. Set active 1 by default.