null and '' operator seems similar but there is a slight difference between these. If you want to check that a string is empty then you can go with ' ' but when you need to check with refernces like ID and collections then you have to use null.
One more difference is that If you declare a variable and don't initialize it with a value, it will be null. In essence, null means the absence of a value. You can use '' with strings and in that case checking for '' will give you true if string has initialized but doesn't have any content.
null and '' operator seems similar but there is a slight difference between these.
If you want to check that a string is empty then you can go with ' ' but when you need to check with refernces like ID and collections then you have to use null.
These links are better resource so check it.
https://success.salesforce.com/answers?id=90630000000hTOsAAM
https://developer.salesforce.com/forums/?id=906F00000008nV0IAI
One more difference is that If you declare a variable and don't initialize it with a value, it will be null. In essence, null means the absence of a value. You can use '' with strings and in that case checking for '' will give you true if string has initialized but doesn't have any content.