Use string comparison instead of ast.literal_eval()

Support "True"/"False" and "true"/"false"