IDEA-119172 Warning 'not all execution paths return a value' when using instanceof