Merge "NULL check in registerListener"