Merge pull request #21 from simonpasquier/fix-salt-api-state

Fix salt.api state to catch undefined data