added tests for api calls

You're right, I just assumed the calls were analogous to checking if e.g. a list is null and if it is empty in java