Added input params validation