Check $this before use
Fixed type annotation