I was more referring to the others where its return isProperty ? pro.getBlah() : ctg.getBlah(); But yes, small code for these simple functions is important.