add null error on edit and add loan