Helper method for detecting callback methods