check for setter method first, since property_exist checks for protected properties as well.