Central method to validate if parameters are provided