Adding some type checking

- handle cases where a service has no units.
Merge pull request #3 from mcameron/master

Adding some type checking