solved null insertion into DB (beta)