Added Preconditions for null and empty string checks

- Fixes #43