The methods you are using are instance method of the IloCplex class (this should be clear from where they are documented). So you need an instance of the IloCplex class to invoke them. Try 'cplex.isLP()'.
I am not sure what is the correct place to invoke these functions (the model must have already been generated for these functions to return the correct thing). Maybe ask on the forum dedicated to OPL.
On the other hand, are you writing some generic code? Otherwise I would expect that you perfectly know what the type of your problem is? CPLEX is not going to magically change that.
#CPLEXOptimizers#DecisionOptimization