Refactored type checking in the SArgs utility methods, because it had a different behaviour in Java 7. Also added unit tests for the SArgs class that would have catched the problem.