Check for undefined moves and throw error