Function to handle the checking of objects, returns the same error messages everywhere, + list of population states