Added a safe guard for empty strings in strcmp

strncmp() is expecting non-null values after all. Besides if we both have
a length of 0 that basically means that we are equal..