Refactored ClosureAPI::Request#valid? method

The ClosureAPI::Request#valid? private method has been refactored to
only contain 2 `unless` statements instead of 4. This made the method a
bit shorter and a lot more readable.

Credits to the original author of the refactored code Justin Collins
from the Ruby mailing list.