Fixed detect implementation

Now calls callback with nil if no tests pass