fixed getallclients

modified action on null object to detect if object is not null first