better nil handling (not checking!) in api controller
fixed template error caused by @sextech #OneCharFix