Minor: small improvements on parameters checking