check_modes function

Check modes of objects