LPS-32729 Fixing possible NullPointerException
LPS-32729 Make logging consistent when return
LSP-32729 Source formatting