handle findAndModify edge cases

also give better error messages