Function to get String value from preference
String from given key if exist, defaultValue if not
String key to refer
String to return if the key doesn't return any value