Update code for checking input parameter