Only ask CDI if at least one bean is found

Only ask CDI for bean instance if at least one bean is found. 

Without this, if we uses classes that are not managed by CDI, execution fails.