Added check for existence of method in package