since the method may be triggered without data, need to test for it

Enyo-DCO-1.1-Signed-off-by: Cole Davis <cole.davis@palm.com>
tidy up

Enyo-DCO-1.1-Signed-off-by: Cole Davis <cole.davis@palm.com>