title: error TS2322: Type 'string | null' is not assignable to type 'number'
body: <p>I want to start by saying that I am really new to both angular and typescript.</p>
  <p>I write a program in angular where I use routing to show more information on another page.</p>
  <p>The errors occurs at the ngOnInit(){</p>
  <p>The first error occurs for: this.blomId
  TS2322: Type 'string | null 'is not assignable to type' number '. Type 'null' is not assignable to type 'number'.</p>
  <p>The second error occurs for: data[this.blomId]
  TS7053: Element implicitly has an 'any' type because expression of type 'number' cannot be used to index type 'Object'. No index signature with a parameter of type 'number' was found on type 'Object'.</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ActivatedRoute } from '@angular/router';
  import { BlommorService } from '../blommor.service';
  
  @Component({
    selector: 'app-info',
    templateUrl: './info.component.html',
    styleUrls: ['./info.component.scss']
  })
  export class InfoComponent implements OnInit {
  
    blomId: number;
    valdblomma: any;
    constructor(private activatedRoute: ActivatedRoute, private blomservice: BlommorService) {this.blomId = 0;}
  
    ngOnInit() {
      this.blomId =this.activatedRoute.snapshot.paramMap.get('id'); 
      this.blomservice.getBlommor().subscribe((data) =&gt; { 
        this.valdblomma = data[this.blomId];
      });
    }
  }
  </code></pre>
  <p>Grateful for help.</p>