Added inputs check