COSMIT use callable instead of hasattr