Cleanup incorrect params in wbeditentity

When trying to write the test for this module
I found that quite often the wrong error was
given. These changes should now make the error
code given to the user more accurate and will
also catch more stuff that previousl sliped
through the checks
Change-Id: I3373ffacc01837fc858526f573b8e347af422c1d
Merge "Cleanup incorrect params in wbeditentity"