Improve existence check in callback.