- Add some checks to prevent crashes in unexpected situations and add useful error...