fixed 'Call to a member function getFormType() on a non-object'

I guess you can test if `$step` is not `null`:

```php
if (null !== $step) {
    // ...
}
```