Add functionality to 'check_atom' function