Fixes the ngModel issue as proposed by pgodel (#1)

- added condition to check if ngModel is undefined, if so we just return