Add alert box for invalid function input