The left hand term of an If ... Then expression determines the type of the comparison. In the case of CallSub the exact return type is not known as it returns a generic Object. You should have got this message which tells you what to do.
Main - 35: Comparison of Object to other types will fail if exact types do not match.
Better to put the object on the right side of the comparison. (warning #35)