Database saving null instead of 0