I haven't dug into this too much, but one example that causes it is:
/effect give @e[type=sheep] glowing
If there are sheep around, it gives out:
An unexpected error occured trying to execute that command
But the sheep do indeed glow.
It also happened with a few other commands, but I wasn't able to see a pattern yet.
The log contains this:
[21:45:41] [Client thread/FATAL]: Error executing task
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_171]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_171]
at k.a(SourceFile:175) [1.13-pre5.jar:?]
at cep.c(SourceFile:769) [1.13-pre5.jar:?]
at cep.a(SourceFile:373) [1.13-pre5.jar:?]
at net.minecraft.client.main.Main.main(SourceFile:143) [1.13-pre5.jar:?]
Caused by: java.lang.NullPointerException