Refactor is_available and is_disabled functions