Added more checks on delete_grant function