Refactor method to return nil instead of an empty string.

Signed-off-by: The Craw <chinese.raundry@gmail.com>