Check http://doc.owncloud.org/server/5.0/developer_manual/general/codingguidelines.html#php section Operators

Me and Björn just fixed a very nasty bug today that arose because of using == instead of ===

Also check http://writecodeonline.com/php/

This if is also working when the file is null

  if(null == '') echo 'hi';