[#50] Some environment return stream_get_contents() as normal string as some as hex, check for hex type before making any string convertion.

Signed-off-by: crynobone <crynobone@gmail.com>