Added parameters validation

Added parameters validation