Removed check of existence of function

As a result of a bug detach was not part of the Bar chart type, this has been fixed so we can remove this check.