Fix NullPointerException if swapping between MatrixExecutionStrategies

I put together an execution strategy which uses a groovy script or groovy file but swapping between the default and mine caused a NPE due to the instance field not being populated after the switch, this fixes it by checking if the instance is there before using the attributes.