Checking if widget has title not working

This is memory and I can’t test right now, but I believe the title is always set. Use !empty( $settings['title'] ) instead and I think you will get the results you expect.