Merge "Fix issue found by sonar: Method call on object which may be null"