Check for CMD_BLANK returns from get_cmd_with_index()

So far we didn't check for CMD_BLANK returns from get_cmd_with_index(), which can lead to unwanted and possibly even
dangerous behaviour if there's something wrong with the mission/memory.

Signed-off-by: Simon Egli <simon.egli@tik.ee.ethz.ch>