Either declare all visible. Introduce getter pattern. Or check visibility prior to access. Going to suggest two fold 1) attempt getter 2) declare all visible prior to access and/or only access non privaye