Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/Command.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/Command.java	(revision 2864)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/Command.java	(revision 2865)
@@ -85,10 +85,13 @@
 	public static Command valueOf(final String name) {
 		if (Utils.isEmpty(name))
-			throw new IllegalArgumentException();
+			throw new NullPointerException("Parameter name is null or empty");
 
-		if (!isValidForGet(name) && !isValidForPost(name))
-			throw new IllegalArgumentException();
-		return (getCommands.get(name) != null) ? getCommands.get(name)
-				: postCommands.get(name);
+		Command command = getCommands.get(name);
+		if (command == null)
+			command = postCommands.get(name);
+		if (command == null)
+			throw new IllegalArgumentException("No suitable command found");
+		
+		return command;
 	}
 	
