better error for bad setState arguments and mergeHelpers

fixes #820