Added a check to make sure that optional parameters to not appear on function types not attached to function declarations.