Api building

we don`t need to put null here, do it simple: 
var timeline;
...
if ( !timeline ) { } 

it will work because timeline for first time is undefined which is false-value