make model save work with null and default